<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCalendarTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('calendar', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('info_id')->comment('日历详情(flow_histories id)');
            $table->integer('owner_id')->comment('日历所属人');
            $table->integer('resume_id')->comment('简历ID');
            $table->string('name',255)->comment('候选人姓名');
            $table->string('position',255)->comment('候选人目标职位');
            $table->string('address',255)->comment('地址');
            $table->string('step_name',255)->comment('步骤名称');
            $table->string('interview_name',255)->comment('邀约人姓名');
            $table->integer('status')->default('0')->comment('0正常，1删除');
            $table->integer('start_time')->comment('开始时间');
            $table->integer('end_time')->comment('结束时间');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `calendar` comment '日历表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('calendar');
    }
}
